<?php
/*
* Author: Jason ZHENG <zmj522008@hotmil.com>
* Date  : 2018/05/30
* Class : Dropdown 下拉框
*/
namespace app\index\controller;

use think\Controller;
use think\Db;
use think\Session;

class Dropdown extends Controller
{ 
	
	public function index()
	{
		echo "Dropdown Controller";
	}

	// 库存状态下拉数据
	public static function warehouse_condition()
	{
		$data =  Db::table('warehouse_condition')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}

	// 采购类别下拉数据
	public static function perchase_source()
	{
		$data =  Db::table('perchase_source')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}

	// 销售状态下拉数据
	public static function sales_condition()
	{
		$data =  Db::table('sales_condition')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}

	// 商品成色下拉数据
	public static function product_fineness()
	{
		$data =  Db::table('product_fineness')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}

	// 销售平台下拉数据
	public static function sales_plateform()
	{
		$data =  Db::table('sales_plateform')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}

	// 支付模式下拉数据
	public static function payment_mode()
	{
		$data =  Db::table('payment_mode')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}

	// 护理状态下拉数据
	public static function nursing_condition()
	{
		$data = Db::table('nursing_condition')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}

	// 商品状态下拉数据
	public static function product_state()
	{
		$data = Db::table('product_state')
				->where(['state'=>0])
				->select();
		return ReturnData::ok($data);
	}
}